DCustomerOrderHistoryPg.widgets = {
	lvMyOrders: ["wm.LiveVariable", {"autoUpdate":false,"inFlightBehavior":"executeLast","maxResults":10,"orderBy":"desc:orderDt","startUpdate":false,"type":"com.servicelivedb.data.Order"}, {}, {
		liveView: ["wm.LiveView", {"dataType":"com.servicelivedb.data.Order","related":["customerByVendorId"],"view":[
{"caption":"OrderId","sortable":true,"dataIndex":"orderId","type":"java.lang.Integer","displayType":"Number","required":true,"readonly":true,"includeLists":true,"includeForms":true,"order":0,"subType":null},
{"caption":"Status","sortable":true,"dataIndex":"status","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1,"subType":null},
{"caption":"Address","sortable":true,"dataIndex":"address","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":2,"subType":null},
{"caption":"UpdatedBy","sortable":true,"dataIndex":"updatedBy","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":3,"subType":null},
{"caption":"Comments","sortable":true,"dataIndex":"comments","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":4,"subType":null},
{"caption":"TotalPrice","sortable":true,"dataIndex":"totalPrice","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":5,"subType":null},
{"caption":"ContactNum","sortable":true,"dataIndex":"contactNum","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":6,"subType":null},
{"caption":"CouponCode","sortable":true,"dataIndex":"couponCode","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":7,"subType":null},
{"caption":"Discount","sortable":true,"dataIndex":"discount","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":8,"subType":null},
{"caption":"OrderDt","sortable":true,"dataIndex":"orderDt","type":"java.util.Date","displayType":"Date","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":9,"subType":null},
{"caption":"Active","sortable":true,"dataIndex":"active","type":"java.lang.Boolean","displayType":"CheckBox","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":10,"subType":null},
{"caption":"Vendor_comment","sortable":true,"dataIndex":"vendor_comment","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":11,"subType":null}
]}, {}],
		binding: ["wm.Binding", {}, {}, {
			wire: ["wm.Wire", {"expression":undefined,"source":"[main].lvLoggedCustomer.customerId","targetProperty":"filter.customerByCustomerId.customerId"}, {}],
			wire1: ["wm.Wire", {"expression":"true","targetProperty":"filter.active"}, {}]
		}]
	}],
	lvOrderItems: ["wm.LiveVariable", {"autoUpdate":false,"inFlightBehavior":"executeLast","startUpdate":false,"type":"com.servicelivedb.data.OrderItems"}, {}, {
		liveView: ["wm.LiveView", {"dataType":"com.servicelivedb.data.OrderItems","related":["items"],"view":[
{"caption":"OrderItemId","sortable":true,"dataIndex":"orderItemId","type":"java.lang.Integer","displayType":"Number","required":true,"readonly":true,"includeLists":true,"includeForms":true,"order":0,"subType":null},
{"caption":"Quantity","sortable":true,"dataIndex":"quantity","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":1,"subType":null},
{"caption":"Price","sortable":true,"dataIndex":"price","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":2,"subType":null},
{"caption":"Comments","sortable":true,"dataIndex":"comments","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":3,"subType":null},
{"caption":"Status","sortable":true,"dataIndex":"status","type":"java.lang.String","displayType":"Text","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":4,"subType":null},
{"caption":"DlvrQuantity","sortable":true,"dataIndex":"dlvrQuantity","type":"java.math.BigDecimal","displayType":"Number","required":false,"readonly":false,"includeLists":true,"includeForms":true,"order":5,"subType":null}
]}, {}],
		binding: ["wm.Binding", {}, {}, {
			wire: ["wm.Wire", {"expression":undefined,"source":"list1.selectedItem","targetProperty":"filter.order"}, {}]
		}]
	}],
	svClearHistory: ["wm.ServiceVariable", {"inFlightBehavior":"executeLast","operation":"clearCustomerOrderHistoryDetails","service":"serviceliveDB"}, {"onSuccess":"lvMyOrders"}, {
		input: ["wm.ServiceInput", {"type":"clearCustomerOrderHistoryDetailsInputs"}, {}, {
			binding: ["wm.Binding", {}, {}, {
				wire: ["wm.Wire", {"expression":"false","targetProperty":"status"}, {}],
				wire1: ["wm.Wire", {"expression":undefined,"source":"[main].lvLoggedCustomer.customerId","targetProperty":"customerId"}, {}]
			}]
		}]
	}],
	ncConfirmDelete: ["wm.NotificationCall", {"operation":"confirm"}, {"onOk":"svClearHistory"}, {
		input: ["wm.ServiceInput", {"type":"confirmInputs"}, {}, {
			binding: ["wm.Binding", {}, {}, {
				wire1: ["wm.Wire", {"expression":"\"Yes\"","targetProperty":"OKButtonText"}, {}],
				wire2: ["wm.Wire", {"expression":"\"No\"","targetProperty":"CancelButtonText"}, {}],
				wire: ["wm.Wire", {"expression":"\"Do you want to delete the Order History?\"","targetProperty":"text"}, {}]
			}]
		}]
	}],
	ldOrders: ["wm.LoadingDialog", {"caption":"Loading Orders.."}, {}, {
		binding: ["wm.Binding", {}, {}, {
			wire: ["wm.Wire", {"expression":undefined,"source":"panel4","targetProperty":"widgetToCover"}, {}],
			wire1: ["wm.Wire", {"expression":undefined,"source":"lvMyOrders","targetProperty":"serviceVariableToTrack"}, {}]
		}]
	}],
	ldOrdersItems: ["wm.LoadingDialog", {"caption":"Loading Order Details.."}, {}, {
		binding: ["wm.Binding", {}, {}, {
			wire: ["wm.Wire", {"expression":undefined,"source":"panel5","targetProperty":"widgetToCover"}, {}],
			wire1: ["wm.Wire", {"expression":undefined,"source":"lvOrderItems","targetProperty":"serviceVariableToTrack"}, {}]
		}]
	}],
	layoutBox1: ["wm.Layout", {"horizontalAlign":"left","styles":{},"verticalAlign":"top"}, {}, {
		panel1: ["wm.Panel", {"height":"100%","horizontalAlign":"left","verticalAlign":"top","width":"100%"}, {}, {
			panel2: ["wm.HeaderContentPanel", {"height":"35px","horizontalAlign":"left","layoutKind":"left-to-right","styles":{},"verticalAlign":"top","width":"100%"}, {}, {
				panel6: ["wm.Panel", {"border":"1","height":"100%","horizontalAlign":"left","layoutKind":"left-to-right","styles":{"color":"#1445ae"},"verticalAlign":"top","width":"55%"}, {}, {
					deleteHistory: ["wm.Button", {"border":"1","caption":"Delete Order History","width":"160px"}, {"onclick":"ncConfirmDelete"}],
					label1: ["wm.Label", {"align":"center","caption":"My Orders (Select to view Items)","height":"100%","padding":"4","styles":{"fontWeight":"bold"},"width":"100%"}, {}]
				}],
				panel7: ["wm.Panel", {"border":"1","height":"100%","horizontalAlign":"left","layoutKind":"left-to-right","styles":{},"verticalAlign":"top","width":"45%"}, {}, {
					spacer2: ["wm.Spacer", {"height":"48px","width":"30px"}, {}],
					label2: ["wm.Label", {"align":"center","caption":"Orders Item Details","height":"100%","padding":"4","styles":{"fontWeight":"bold","color":"#1445ae"},"width":"100%"}, {}],
					button1: ["wm.Button", {"border":"1","caption":"Refresh Data","height":"100%","margin":"4","width":"150px"}, {"onclick":"lvMyOrders"}]
				}]
			}],
			panel3: ["wm.Panel", {"border":"2","borderColor":"#ed8989","height":"100%","horizontalAlign":"left","layoutKind":"left-to-right","styles":{"borderRadius":"8px"},"verticalAlign":"top","width":"100%"}, {}, {
				panel4: ["wm.Panel", {"autoScroll":true,"border":"1","borderColor":"#ed8989","height":"100%","horizontalAlign":"left","styles":{},"verticalAlign":"top","width":"55%"}, {}, {
					button2: ["wm.Button", {"border":"1","caption":"No orders Available","desktopHeight":"45undefined","height":"45undefined","imageIndex":26,"imageList":"app.silkIconList","styles":{},"width":"100%"}, {}, {
						binding: ["wm.Binding", {}, {}, {
							wire: ["wm.Wire", {"expression":undefined,"source":"lvMyOrders.isEmpty","targetProperty":"showing"}, {}]
						}]
					}],
					list1: ["wm.List", {"_classes":{"domNode":["MobileListStyle"]},"borderColor":"#ed8989","columns":[
{"show":true,"field":"orderId","title":"Order#","width":"100%","align":"left","formatFunc":"list1OrderIdFormat","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":false,"field":"status","title":"Status","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"address","title":"Address","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"contactNum","title":"ContactNum","width":"80px","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"updatedBy","title":"UpdatedBy","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"comments","title":"Comments","width":"100%","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"mobileColumn":false},
{"show":false,"field":"vendor_comment","title":"Vendor_comment","width":"100%","align":"left","formatFunc":"","editorProps":null,"mobileColumn":false},
{"show":true,"field":"totalPrice","title":"TotalPrice","width":"80px","align":"left","formatFunc":"","editorProps":{"restrictValues":true},"expression":"\"<div class='MobileRow'>TotalPrice: \" +${totalPrice}+ \" Rs</div>\"","mobileColumn":false},
{"show":false,"field":"PHONE COLUMN","title":"-","width":"100%","align":"left","editorProps":{"restrictValues":true},"expression":"\"<div class='MobileRowTitle'>\" +\n\"Order#: \" + ${wm.runtimeId}.formatCell(\"orderId\", ${orderId}, ${this}, ${wm.rowId}) +\n\"</div>\"\n\n+ \"<div class='MobileRow'>\" +\n\"TotalPrice: \" + ${wm.runtimeId}.formatCell(\"totalPrice\", ${totalPrice}, ${this}, ${wm.rowId})\n + \"</div>\"\n\n","mobileColumn":false},
{"show":false,"field":"couponCode","title":"CouponCode","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"discount","title":"Discount","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"orderDt","title":"OrderDt","width":"80px","align":"left","formatFunc":"wm_date_formatter","mobileColumn":false},
{"show":false,"field":"active","title":"Active","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":true,"controller":"rightarrow","width":"20px","title":"-","field":"_rightArrow","mobileColumn":true}
],"headerVisible":false,"height":"100%","margin":"1","minDesktopHeight":60,"padding":"2","rightNavArrow":true,"styleAsGrid":false,"styles":{"borderRadius":"8px"}}, {"onSelect":"lvOrderItems"}, {
						binding: ["wm.Binding", {}, {}, {
							wire: ["wm.Wire", {"expression":undefined,"source":"lvMyOrders","targetProperty":"dataSet"}, {}],
							wire1: ["wm.Wire", {"expression":"!${lvMyOrders.isEmpty}","targetProperty":"showing"}, {}]
						}]
					}]
				}],
				panel5: ["wm.Panel", {"autoScroll":true,"border":"1","height":"100%","horizontalAlign":"left","layoutKind":"left-to-right","styles":{},"verticalAlign":"top","width":"45%"}, {}, {
					spacer1: ["wm.Spacer", {"height":"48px","width":"30px"}, {}],
					list2: ["wm.List", {"_classes":{"domNode":["MobileListStyle"]},"border":"2","borderColor":"#ed8989","columns":[
{"show":true,"field":"orderItemId","title":"OrderItemId","width":"100%","align":"left","formatFunc":"list2OrderItemIdFormat","editorProps":{"restrictValues":true},"expression":"\n\n","mobileColumn":false},
{"show":false,"field":"quantity","title":"Quantity","width":"80px","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"price","title":"Price","width":"80px","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"comments","title":"Comments","width":"100%","align":"left","formatFunc":"","mobileColumn":false},
{"show":false,"field":"PHONE COLUMN","title":"-","width":"100%","align":"left","expression":"\"<div class='MobileRowTitle'>\" +\n\"OrderItemId: \" + ${wm.runtimeId}.formatCell(\"orderItemId\", ${orderItemId}, ${this}, ${wm.rowId}) +\n\"</div>\"\n\n","mobileColumn":false},
{"show":false,"field":"status","title":"Status","width":"100%","displayType":"Text","align":"left","formatFunc":""},
{"show":false,"field":"dlvrQuantity","title":"DlvrQuantity","width":"80px","displayType":"Number","align":"left","formatFunc":""}
],"headerVisible":false,"height":"100%","margin":"1","minDesktopHeight":60,"padding":"2","selectionMode":"none","styleAsGrid":false,"styles":{"borderRadius":"8px"},"width":"80%"}, {}, {
						binding: ["wm.Binding", {}, {}, {
							wire: ["wm.Wire", {"expression":undefined,"source":"lvOrderItems","targetProperty":"dataSet"}, {}],
							wire1: ["wm.Wire", {"expression":undefined,"source":"list1.emptySelection","targetProperty":"disabled"}, {}],
							wire2: ["wm.Wire", {"expression":"!${list1.emptySelection}","targetProperty":"showing"}, {}]
						}]
					}]
				}]
			}]
		}]
	}]
}